﻿namespace EasyStep.Business.Managers
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using EasyStep.Business.Interfaces.Providers;
    using EasyStep.Data.Entities;
    using EasyStep.Business.Interfaces.Managers;

    public class TestStepManager : BaseDataManager<ITestStepProvider, TestStep>, ITestStepManager
    {
        public TestStepManager(ITestStepProvider provider)
            : base(provider)
        {

        }

        public IEnumerable<TestStep> GetTestSteps(Guid forTest)
        {
            return Provider.GetTestSteps(forTest);
        }


        public string Convert(TestStep item)
        {
            return item == null ? null : item.Serialize();
        }

        public TestStep Convert(string serializedItem)
        {
            return serializedItem == null ? null : serializedItem.Deserialize < TestStep>();
        }
    }

}
